﻿import { errorTips } from './utils';
import { t } from '@/lang/index';
export default function codeErrorHandle(code: number) {
    switch (code) {
        case 999:
            errorTips(t('Code.UnknownError'));
            break;
        case 2:
            errorTips(t('Code.OperationFailed'));
            break;
        case 3:
            errorTips(t('Code.InvalidParameter'));
            break;
        case 4:
            errorTips(t('Code.Unauthorized'));
            break;
        case 5:
            errorTips(t('Code.OperationProhibited'));
            break;
        case 78:
            errorTips(t('Code.TheGroupMembersEmpty'));
            break;
        case 79:
            errorTips(t('Code.Limit'));
            break;
        case 80:
            errorTips(t('Code.YouDonotThisGroupChat'));
            break;
        case 81:
            errorTips(t('Code.NotTheGroupLeader'));
            break;
        case 82:
            errorTips(t('Code.TheGroupNameIsEmpty'));
            break;
        case 83:
            errorTips(t('Code.ExceedsTheLimit'));
            break;
        case 84:
            errorTips(t('Code.FailedCreate'));
            break;
        case 85:
            errorTips(t('Code.GroupDisbanded'));
            break;
        case 141:
            errorTips(t('Code.Tenarticles'));
            break;

        default:
            errorTips(t('Code.UnknownError'));
            break;
    }
}
